home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat3
/
Tk
/
tkerror.z
/
tkerror
Wrap
Text File
|
1998-10-30
|
4KB
|
67 lines
ttttkkkkeeeerrrrrrrroooorrrr((((3333TTTTkkkk)))) ttttkkkkeeeerrrrrrrroooorrrr((((3333TTTTkkkk))))
NNNNAAAAMMMMEEEE
tkerror - Command invoked to process background errors
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ttttkkkkeeeerrrrrrrroooorrrr _m_e_s_s_a_g_e
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The ttttkkkkeeeerrrrrrrroooorrrr command doesn't exist as built-in part of Tk. Instead,
individual applications or users can define a ttttkkkkeeeerrrrrrrroooorrrr command (e.g. as a
Tcl procedure) if they wish to handle background errors.
A background error is one that occurs in a command that didn't originate
with the application. For example, if an error occurs while executing a
command specified with a bbbbiiiinnnndddd of aaaafffftttteeeerrrr command, then it is a background
error. For a non-background error, the error can simply be returned up
through nested Tcl command evaluations until it reaches the top-level
code in the application; then the application can report the error in
whatever way it wishes. When a background error occurs, the unwinding
ends in the Tk library and there is no obvious way for Tk to report the
error.
When Tk detects a background error, it saves information about the error |
and invokes the ttttkkkkeeeerrrrrrrroooorrrr command later when Tk is idle. Before invoking |
ttttkkkkeeeerrrrrrrroooorrrr, Tk restores the eeeerrrrrrrroooorrrrIIIInnnnffffoooo and eeeerrrrrrrroooorrrrCCCCooooddddeeee variables to their |
values at the time the error occurred, then it invokes ttttkkkkeeeerrrrrrrroooorrrr with the
error message as its only argument. Tk assumes that the application has
implemented the ttttkkkkeeeerrrrrrrroooorrrr command, and that the command will report the
error in a way that makes sense for the application. Tk will ignore any
result returned by the ttttkkkkeeeerrrrrrrroooorrrr command.
If another Tcl error occurs within the ttttkkkkeeeerrrrrrrroooorrrr command (for example,
because no ttttkkkkeeeerrrrrrrroooorrrr command has been defined) then Tk reports the error
itself by writing a message to stderr.
If several background errors accumulate before ttttkkkkeeeerrrrrrrroooorrrr is invoked to |
process them, ttttkkkkeeeerrrrrrrroooorrrr will be invoked once for each error, in the order |
they occurred. However, if ttttkkkkeeeerrrrrrrroooorrrr returns with a break exception, then |
any remaining errors are skipped without calling ttttkkkkeeeerrrrrrrroooorrrr.
The Tk script library includes a default ttttkkkkeeeerrrrrrrroooorrrr procedure that posts a
dialog box containing the error message and offers the user a chance to
see a stack trace showing where the error occurred.
KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
background error, reporting
PPPPaaaaggggeeee 1111